<template>
  <div id="iTime" class="unSelect">{{ time }}</div>
</template>

<script>
import { format } from '../plugins/moment'
export default {
  name: 'iTimeNow',
  data() {
    return {
      time: ''
    }
  },
  methods: {
    setTime() {
      this.time = format('YYYY年M月D日 H:mm:ss')
      setInterval(() => {
        this.time = format('YYYY年M月D日 H:mm:ss')
      }, 1000)
    }
  },
  mounted() {
    this.setTime()
  }
}
</script>
